﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeGame
{
    class EntityContainer : Entity
    {

        protected List<Entity> Entities = new List<Entity>();

        public virtual void AddEntity(Entity ent)
        {
            this.Entities.Add(ent);
        }

        public override void Draw()
        {
            foreach (Entity ent in this.Entities)
            {
                ent.Draw();
            }
        }

        public override void Update()
        {
            foreach (Entity ent in this.Entities)
            {
                ent.Update();
            }
        }
    }
}
